/*
 * Container.h
 */

#ifndef CONTAINER_H_
#define CONTAINER_H_

#include "../Widget.h"
#include <list>

class Container : public Widget {
public:
	Container();
	Container(Sint16 posX, Sint16 posY, Uint16 w, Uint16 h);
	virtual ~Container();
	void add(Widget& widget);
	void show();  // Reescribe show llamando a showAllChildren por ser contenedor
	void showAllChildren();
protected:
	std::list<Widget*> widgets;
	virtual void draw(SDL_Surface* screen);
	// Broadcast the event to all the contained widgets
	void broadcastEvents(SDL_Event* event);
};

#endif /* CONTAINER_H_ */
